package org.leaf.green.b2b

class RetailerInventory {

    Retailer retailer
    Date date

    static hasMany = [details : RetailerInventoryDetail]

    static constraints = {
        retailer(nullable:false)
        date(nullable:false, unique : true)
    }

    static mapping = {
        table 'B2B_RETAILER_INVENTORY'
        details cascade:"all-delete-orphan", sort:"id", batchSize: 100
    }
}
